import request from '@/utils/http.js'

// 分页获取品牌信息
export const getBrandListApi = (params) => {
  return request({
    url: 'pms/backend/brand/list',
    method: "GET",
    params: params,
  })
}

// 添加品牌
export const saveBrandInfoApi = (data) => {
  return request({
    url: 'pms/backend/brand/save',
    method: "POST",
    data: JSON.stringify(data),
  })
}

// 根据id查询品牌信息
export const getBrandInfoApi = (id) => {
  return request({
    url: `pms/backend/brand/info/${id}`,
    method: "GET",
  })
}

// 根据id查询品牌信息
export const updateBrandInfoApi = (data) => {
  return request({
    url: 'pms/backend/brand/update',
    method: "PUT",
    data: JSON.stringify(data),
  })
}

// 根据id删除品牌信息
export const deleteBrandApi = (ids) => {
  return request({
    url: 'pms/backend/brand/delete',
    method: "DELETE",
    data: JSON.stringify(ids),
  })
}